package com.story.modular.app.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.story.common.persistence.dao.GgMangerDao;
import com.story.common.persistence.model.GgMangerEntity;
import com.story.common.persistence.model.GgMangerVo;
import com.story.modular.app.service.GgMangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Service实现类
 *
 * @author wangjj
 * @email 987995507@qq.com
 * @date 2019-12-27 11:44:35
 */
@Service("ggMangerService")
public class GgMangerServiceImpl implements GgMangerService {
    @Autowired
    private GgMangerDao ggMangerDao;

    @Override
    public GgMangerEntity queryObject(Integer id) {
        return ggMangerDao.selectById(id);
    }

    @Override
    public List<GgMangerEntity> queryList(Map<String, Object> map) {
        return ggMangerDao.selectByMap(map);
    }

    @Override
    public List<GgMangerVo> queryPageList(Page<GgMangerVo> page, String name, String typename,Integer categoryid, String stoptime, String desc,String searchType) {
        return ggMangerDao.queryPageList(page,name,typename,categoryid,stoptime,desc,searchType);
    }


    @Override
    public int queryTotal(Map<String, Object> map) {
        return 0;
    }

    @Override
    public int save(GgMangerEntity ggManger) {
        return ggMangerDao.insert(ggManger);
    }

    @Override
    public int update(GgMangerEntity ggManger) {
        return ggMangerDao.updateById(ggManger);
    }

    @Override
    public int delete(Integer id) {
        return ggMangerDao.deleteById(id);
    }

    @Override
    public int deleteBatch(Integer[] ids) {
        return 0;
    }

}
